﻿using System;
using System.Collections.Generic;
using System.Text;
using yb.commerce.DAL;
using yb.commerce.Model;

namespace yb.commerce.BLL
{
    public class ProductRelateArticleBusiness
    {
        public bool Add(ProductRelateArticle productRelateArticle)
        {
            return new ProductRelateArticleDAO().Add(productRelateArticle);
        }

        public bool Delete(int Id)
        {
            return new ProductRelateArticleDAO().Delete(Id);
        }

        public bool Update(ProductRelateArticle productRelateArticle)
        {
            return new ProductRelateArticleDAO().Update(productRelateArticle);
        }

        public ProductRelateArticle GetEntity(int Id)
        {
            return new ProductRelateArticleDAO().GetEntity(Id);
        }

        public DataRecordTable GetList(string fieldList, string orderField, bool orderBy, int pageIndex, int pageSize, string where)
        {
            return new ProductRelateArticleDAO().GetList(fieldList,orderField,orderBy,pageIndex,pageSize,where);
        }
        public System.Data.DataTable GetListByProductId(int productId)
        {
            return new ProductRelateArticleDAO().GetListByProductId(productId);
        }
        public bool IsSameRecord(int productId, int articleId) 
        {
            return new ProductRelateArticleDAO().IsSameRecord(productId,articleId);
        }
    }
}
